package com.phoenix.rabbitmq.pojo;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

public class OrderMessage implements Serializable {
    private String orderId;

    private String productName;

    private BigDecimal amount;

    private Integer quantity;

    private LocalDateTime creteTime;

    public OrderMessage() {
    }

    public OrderMessage(String orderId, String productName, BigDecimal amount, Integer quantity) {
        this.orderId = orderId;
        this.productName = productName;
        this.amount = amount;
        this.quantity = quantity;
        this.creteTime = LocalDateTime.now();
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public LocalDateTime getCreteTime() {
        return creteTime;
    }

    public void setCreteTime(LocalDateTime creteTime) {
        this.creteTime = creteTime;
    }

    @Override
    public String toString() {
        return "OrderMessage{" +
                "orderId='" + orderId + '\'' +
                ", productName='" + productName + '\'' +
                ", amount=" + amount +
                ", quantity=" + quantity +
                ", creteTime=" + creteTime +
                '}';
    }
}
